{% extends "base.html" %}

{% block style %}
    <style>
        .layui-form {
            margin-top: 80px
        }

        .demo-reg-container {
            width: 320px;
            margin: 21px auto 0;
        }

        .demo-reg-other .layui-icon {
            position: relative;
            display: inline-block;
            margin: 0 2px;
            top: 2px;
            font-size: 26px;
        }

        .logo {
            width: 60px !important;
            margin-top: 10px !important;
            margin-bottom: 10px !important;
            margin-left: 20px !important;
        }

        .title {
            font-size: 30px !important;
            font-weight: 550 !important;
            margin-left: 20px !important;
            color: #5FB878 !important;
            display: inline-block !important;
            height: 60px !important;
            line-height: 60px !important;
            margin-top: 10px !important;
            position: absolute !important;
        }

        .desc {
            width: 100% !important;
            text-align: center !important;
            color: gray !important;
            height: 60px !important;
            line-height: 60px !important;
        }

    </style>
{% endblock %}

{% block body %}
    <form class="layui-form" lay-filter="register-form" method="POST">
        <div class="demo-reg-container">
            <div class="layui-form-item">
                {#                <img class="logo" src="/static/images/admin/logo2.png"/>#}
                <div class="title">HP News</div>
                <div class="desc">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-username"></i>
                    </div>
                    <input type="text" name="nick_name" value="" lay-verify="required" placeholder="昵称"
                           autocomplete="off"
                           class="layui-input" lay-affix="clear">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-row">
                    <div class="layui-col-xs7">
                        <div class="layui-input-wrap">
                            <div class="layui-input-prefix">
                                <i class="layui-icon layui-icon-email"></i>
                            </div>
                            <input type="text"
                                   name="email"
                                   value=""
                                   lay-verify="required|email"
                                   placeholder="邮箱"
                                   lay-reqtext="请填写邮箱"
                                   autocomplete="off"
                                   class="layui-input"
                                   id="reg-email">
                        </div>
                    </div>
                    <div class="layui-col-xs5">
                        <div style="margin-left: 11px;">
                            <button type="button"
                                    class="layui-btn layui-btn-fluid layui-btn-primary"
                                    id="get_email_captcha"
                                    lay-on="reg-get-vercode">获取验证码
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-vercode"></i>
                    </div>
                    <input type="text" name="vercode" value="" lay-verify="required" placeholder="验证码"
                           lay-reqtext="请填写验证码" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-password"></i>
                    </div>
                    <input type="password" name="password" value="" lay-verify="required" placeholder="密码"
                           autocomplete="off" class="layui-input" id="reg-password" lay-affix="eye">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-password"></i>
                    </div>
                    <input type="password" name="confirmPassword" value="" lay-verify="required|confirmPassword"
                           placeholder="确认密码" autocomplete="off" class="layui-input" lay-affix="eye">
                </div>
            </div>

            <div class="layui-form-item">
                <input type="checkbox" name="agreement" lay-verify="required" lay-skin="primary" title="同意">
                <a href="#terms" target="_blank" style="position: relative; top: 6px; left: -15px;">
                    <ins>用户协议</ins>
                </a>
            </div>
            <div class="layui-form-item">
                <button class="layui-btn layui-btn-fluid regg" lay-submit lay-on="msg" lay-filter="demo-reg">注册
                </button>
            </div>
            <div class="layui-form-item demo-reg-other">
                <label>社交账号注册</label>
                <span style="padding: 0 21px 0 6px;">
        <a href="javascript:;"><i class="layui-icon layui-icon-login-qq" style="color: #3492ed;"></i></a>
        <a href="javascript:;"><i class="layui-icon layui-icon-login-wechat" style="color: #4daf29;"></i></a>
        <a href="javascript:;"><i class="layui-icon layui-icon-login-weibo" style="color: #cf1900;"></i></a>
      </span>
                <a href="/login">登录已有帐号</a>
            </div>
        </div>
    </form>
{% endblock %}


{% block js %}
    <script src="/static/js/register2.js"></script>
    <script>
      layui.use(function() {
        var layer = layui.layer;
        var util = layui.util;
        // 批量事件
        util.on('lay-on', {
          msg: function() {
            layer.msg('一段提示信息');
          },
        });
      });
    </script>
{% endblock %}